{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "True\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "x = 5\n",
    "print(isinstance(x, int))  # 输出: True，因为 x 是整数类型\n",
    "\n",
    "y = \"Hello\"\n",
    "print(isinstance(y, str))  # 输出: True，因为 y 是字符串类型\n",
    "\n",
    "z = [1, 2, 3]\n",
    "print(isinstance(z, (list, tuple)))  # 输出: True，因为 z 是列表类型"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
